public class grade {
    int chinese;
    int maths;
    int english;
    int physics;
    int chemistry;
    int biont;
    int sum;
    double ave;
    int max;
    int sumgrade(){
        sum = chinese + maths + english + physics + chemistry + biont;
        return sum;
    }
    double avegrade(){
        ave = (double)sum/6.0;
        return ave;
    }
    int maxgrade(){
        int arr[] = {chinese,maths,english,physics,chemistry,biont};
        max = arr[0];
        for (int i = 1; i < arr.length; i++){
            if(arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }

}
